<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<% 
	String path = request.getContextPath();  
	System.out.println("--------------------------"+request.getRequestURI());
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> 
<script type="text/javascript">
	function sunbmit(){
		document.forms["subform"].submit();
		alert("aaa");
	}

</script> 
<head>  
<base href="<%=basePath%>">  
<title>My JSP 'welcome.jsp' starting page</title>  
<meta http-equiv="pragma" content="no-cache">  
<meta http-equiv="cache-control" content="no-cache">  
</head>  
<body>  
    你好！
    <form name="subform" action="login" method="post">
    	<input name="user" type="text" />
    </form>
    <button onclick="sunbmit()">确定</button>
</body>  
</html>